package com.weakteam.orderonline.adminconsole.gwt.client.util.uploader.file;

import com.google.gwt.core.client.GWT;
import com.google.gwt.regexp.shared.MatchResult;
import com.google.gwt.regexp.shared.RegExp;
import com.weakteam.orderonline.adminconsole.gwt.client.util.WebContext;


/**
 * @author Nail
 */
public class FileUtil {
    public static int IMAGE = 0;
    public static int ICO = 1;
    public static String getImageURL(String name) {
        return WebContext.getInstance().getRootContext() + "getImage?name=" + name;
    }
//    public static String getImageName(String url) {
//        RegExp p = RegExp.compile("[\\?&]name=([^&]*)");
//        MatchResult m = p.exec(url);
//        return (m==null)?"null":m.getGroup(1);
//    }
}
